package dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;

import services.Service;

public abstract class DAO<T> {
	protected Connection connection = null;
  
	public DAO(Connection conn){
		this.connection = conn;
	}

	public String braquet(String name){
		return ("'"+name+"'");
	}

	public abstract boolean create(T obj) throws SQLException;
	public abstract boolean delete(T obj) throws SQLException;
	public abstract boolean delete(int id) throws SQLException;
	public abstract boolean update(int id, T obj) throws SQLException;
	public abstract T find(int id) throws SQLException; 
	public abstract T find(String name) throws SQLException;
	
}
